package br.com.ps.bombertournament.game.object;

import br.com.ps.bombertournament.game.BaseGameObject;

import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle;

public class Label extends BaseGameObject {

	private com.badlogic.gdx.scenes.scene2d.ui.Label label;
	
	public Label(String text) {
		label = new com.badlogic.gdx.scenes.scene2d.ui.Label(text, new LabelStyle(new BitmapFont(), Color.WHITE)); 
	}
	
	@Override
	public void onRemove() {
		// Do nothing
	}
	
	@Override
	public void setBounds(float x, float y, float width, float height) {
		label.x = x;
		label.y = y;
		label.width = width;
		label.height = height;
	}

	@Override
	public void setPosition(float x, float y) {
		label.x = x;
		label.y = y;
	}

	@Override
	public void render(SpriteBatch spriteBatch) {
		label.draw(spriteBatch, 1);
	}

	@Override
	public void onCollision(BaseGameObject other) {
		// Do nothing
	}
	
	@Override
	public void setScale(float scaleX, float scaleY) {
		label.scaleX = scaleX;
		label.scaleY = scaleY;
	}

	@Override
	public void setScale(float scaleXY) {
		label.scaleX = scaleXY;
		label.scaleY = scaleXY;
	}
	
	public void setText (String text) {
		label.setText(text);
	}
}
